<!DOCTYPE html>
<html lang="zh-cn">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <title>[go] Go语言编译和工具链 - Never Give Up</title>
  <meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>

<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<meta name="theme-color" content="#f8f5ec" />
<meta name="msapplication-navbutton-color" content="#f8f5ec">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#f8f5ec">


<meta name="author" content="ZhangKQ" /><meta name="description" content="Go语言编译和工具链 ​ Go 语言的工具链非常丰富，从获取源码、编译、文档、测试、性能分析，到源码格式化、源码提示、重构工具等应有尽有。 ​ 在 Go 语言" /><meta name="keywords" content="开发语言, 后端, golang, go语言, 编译, 工具链, clean" />






<meta name="generator" content="Hugo 0.92.0 with theme even" />


<link rel="canonical" href="https://blog.nevergiveup.tech/post/dev_language/golang/go%E8%AF%AD%E8%A8%80%E7%BC%96%E8%AF%91%E5%92%8C%E5%B7%A5%E5%85%B7%E9%93%BE/" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">



<link href="/sass/main.min.b5a744db6de49a86cadafb3b70f555ab443f83c307a483402259e94726b045ff.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.css" integrity="sha256-7TyXnr2YU040zfSP+rEcz29ggW4j56/ujTPwjMzyqFY=" crossorigin="anonymous">


<meta property="og:title" content="[go] Go语言编译和工具链" />
<meta property="og:description" content="Go语言编译和工具链 ​ Go 语言的工具链非常丰富，从获取源码、编译、文档、测试、性能分析，到源码格式化、源码提示、重构工具等应有尽有。 ​ 在 Go 语言" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://blog.nevergiveup.tech/post/dev_language/golang/go%E8%AF%AD%E8%A8%80%E7%BC%96%E8%AF%91%E5%92%8C%E5%B7%A5%E5%85%B7%E9%93%BE/" /><meta property="article:section" content="post" />
<meta property="article:published_time" content="2022-02-18T15:37:56+08:00" />
<meta property="article:modified_time" content="2022-02-18T16:37:56+08:00" />

<meta itemprop="name" content="[go] Go语言编译和工具链">
<meta itemprop="description" content="Go语言编译和工具链 ​ Go 语言的工具链非常丰富，从获取源码、编译、文档、测试、性能分析，到源码格式化、源码提示、重构工具等应有尽有。 ​ 在 Go 语言"><meta itemprop="datePublished" content="2022-02-18T15:37:56+08:00" />
<meta itemprop="dateModified" content="2022-02-18T16:37:56+08:00" />
<meta itemprop="wordCount" content="2083">
<meta itemprop="keywords" content="开发语言,后端,golang,go语言,编译,工具链,clean," /><meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="[go] Go语言编译和工具链"/>
<meta name="twitter:description" content="Go语言编译和工具链 ​ Go 语言的工具链非常丰富，从获取源码、编译、文档、测试、性能分析，到源码格式化、源码提示、重构工具等应有尽有。 ​ 在 Go 语言"/>

<!--[if lte IE 9]>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/classlist/1.1.20170427/classList.min.js"></script>
<![endif]-->

<!--[if lt IE 9]>
  <script src="https://cdn.jsdelivr.net/npm/html5shiv@3.7.3/dist/html5shiv.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/respond.js@1.4.2/dest/respond.min.js"></script>
<![endif]-->

</head>
<body>
  <div id="mobile-navbar" class="mobile-navbar">
  <div class="mobile-header-logo">
    <a href="/" class="logo">Never Give Up</a>
  </div>
  <div class="mobile-navbar-icon">
    <span></span>
    <span></span>
    <span></span>
  </div>
</div>
<nav id="mobile-menu" class="mobile-menu slideout-menu">
  <ul class="mobile-menu-list">
    <a href="/">
        <li class="mobile-menu-item">主页</li>
      </a><a href="/post/">
        <li class="mobile-menu-item">归档</li>
      </a><a href="/tags/">
        <li class="mobile-menu-item">标签</li>
      </a><a href="/categories/">
        <li class="mobile-menu-item">分类</li>
      </a><a href="/remark/">
        <li class="mobile-menu-item">随言碎语</li>
      </a><a href="/about/">
        <li class="mobile-menu-item">关于</li>
      </a>
  </ul>

  


</nav>

  <div class="container" id="mobile-panel">
    <header id="header" class="header">
        <div class="logo-wrapper">
  <a href="/" class="logo">Never Give Up</a>
</div>





<nav class="site-navbar">
  <ul id="menu" class="menu">
    <li class="menu-item">
        <a class="menu-item-link" href="/">主页</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/post/">归档</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/tags/">标签</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/categories/">分类</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/remark/">随言碎语</a>
      </li><li class="menu-item">
        <a class="menu-item-link" href="/about/">关于</a>
      </li>
  </ul>
</nav>

    </header>

    <main id="main" class="main">
      <div class="content-wrapper">
        <div id="content" class="content">
          <article class="post">
    
    <header class="post-header">
      <h1 class="post-title">[go] Go语言编译和工具链</h1>

      <div class="post-meta">
        <span class="post-time"> 2022-02-18 </span>
        <div class="post-category">
            <a href="/categories/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/"> 开发语言 </a>
            <a href="/categories/golang/"> golang </a>
            </div>
          <span class="more-meta"> 约 2083 字 </span>
          <span class="more-meta"> 预计阅读 5 分钟 </span>
        
      </div>
    </header>

    <div class="post-toc" id="post-toc">
  <h2 class="post-toc-title">文章目录</h2>
  <div class="post-toc-content">
    <nav id="TableOfContents">
  <ul>
    <li><a href="#go语言编译和工具链">Go语言编译和工具链</a>
      <ul>
        <li><a href="#一go-build命令">一.go build命令</a>
          <ul>
            <li><a href="#2go-build文件列表">2.go build+文件列表</a></li>
            <li><a href="#3go-build包">3.go build+包</a></li>
            <li><a href="#4go-build-编译时的附加参数">4.go build 编译时的附加参数</a></li>
            <li><a href="#5go-build时指定系统及环境">5.go build时指定系统及环境</a></li>
            <li><a href="#6go-build时使用ldflags">6.go build时使用ldflags</a></li>
          </ul>
        </li>
        <li><a href="#二go-clean命令清除编译文件">二.go clean命令——清除编译文件</a>
          <ul>
            <li><a href="#1go-clean">1.go clean</a></li>
            <li><a href="#2go-clean--i--n">2.go clean -i -n</a></li>
            <li><a href="#3演示">3.演示</a></li>
          </ul>
        </li>
        <li><a href="#三参考文献">三.参考文献</a></li>
      </ul>
    </li>
  </ul>
</nav>
  </div>
</div>
    <div class="post-content">
      <h1 id="go语言编译和工具链">Go语言编译和工具链</h1>
<p>​	Go 语言的工具链非常丰富，从获取源码、编译、文档、测试、性能分析，到源码格式化、源码提示、重构工具等应有尽有。</p>
<p>​	在 Go 语言中可以使用测试框架编写单元测试，使用统一的命令行即可测试及输出测试报告的工作。基准测试提供可自定义的计时器和一套基准测试算法，能方便快速地分析一段代码可能存在的 CPU 耗用和内存分配问题。性能分析工具可以将程序的 CPU 耗用、内存分配、竞态问题以图形化方式展现出来。</p>
<h2 id="一go-build命令">一.go build命令</h2>
<p>​	Go语言的编译速度非常快。Go 1.9 版本后默认利用Go语言的并发特性进行函数粒度的并发编译。</p>
<p>​	Go语言的程序编写基本以源码方式，无论是自己的代码还是第三方代码，并且以 GOPATH 作为工作目录和一套完整的工程目录规则。因此Go语言中日常编译时无须像 <a href="http://c.biancheng.net/cplus/">C++</a> 一样配置各种包含路径、链接库地址等。</p>
<p>​	Go语言中使用 go build 命令主要用于编译代码。在包的编译过程中，若有必要，会同时编译与之相关联的包。</p>
<p>​	go build 有很多种编译方法，如无参数编译、文件列表编译、指定包编译等，使用这些方法都可以输出可执行文件。</p>
<h3 id="2go-build文件列表">2.go build+文件列表</h3>
<p>编译同目录的多个源码文件时，可以在 go build 的后面提供多个文件名，go build 会编译这些源码，输出可执行文件，“go build+文件列表”的格式如下：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="k">go</span> <span class="nx">build</span> <span class="nx">file1</span><span class="p">.</span><span class="k">go</span> <span class="nx">file2</span><span class="p">.</span><span class="k">go</span><span class="err">……</span>
</code></pre></td></tr></table>
</div>
</div><blockquote>
<h4 id="提示">提示</h4>
<p>使用“go build+文件列表”方式编译时，可执行文件默认选择文件列表中第一个源码文件作为可执行文件名输出。</p>
</blockquote>
<p>如果需要指定输出可执行文件名，可以使用<code>-o</code>参数</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="k">go</span> <span class="nx">build</span> <span class="o">-</span><span class="nx">o</span> <span class="nx">myexec</span> <span class="nx">main</span><span class="p">.</span><span class="k">go</span> <span class="nx">lib</span><span class="p">.</span><span class="k">go</span>
</code></pre></td></tr></table>
</div>
</div><blockquote>
<h4 id="注意">注意</h4>
<p>使用“go build+文件列表”编译方式编译时，文件列表中的每个文件必须是同一个包的 Go 源码。也就是说，不能像 C++ 一样将所有工程的 Go 源码使用文件列表方式进行编译。编译复杂工程时需要用“指定包编译”的方式。</p>
<p>“go build+文件列表”方式更适合使用Go语言编写的只有少量文件的工具。</p>
</blockquote>
<h3 id="3go-build包">3.go build+包</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="k">go</span> <span class="nx">build</span> <span class="o">-</span><span class="nx">o</span> <span class="nx">main</span> <span class="nx">项目目录或者mian文件位置</span>
</code></pre></td></tr></table>
</div>
</div><h3 id="4go-build-编译时的附加参数">4.go build 编译时的附加参数</h3>
<p>go build 还有一些附加参数，可以显示更多的编译信息和更多的操作，详见下表所示。</p>
<table>
<thead>
<tr>
<th>附加参数</th>
<th>备  注</th>
</tr>
</thead>
<tbody>
<tr>
<td>-v</td>
<td>编译时显示包名</td>
</tr>
<tr>
<td>-p n</td>
<td>开启并发编译，默认情况下该值为 CPU 逻辑核数</td>
</tr>
<tr>
<td>-a</td>
<td>强制重新构建</td>
</tr>
<tr>
<td>-n</td>
<td>打印编译时会用到的所有命令，但不真正执行</td>
</tr>
<tr>
<td>-x</td>
<td>打印编译时会用到的所有命令</td>
</tr>
<tr>
<td>-race</td>
<td>开启竞态检测</td>
</tr>
</tbody>
</table>
<h3 id="5go-build时指定系统及环境">5.go build时指定系统及环境</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="nx">GOOS</span> <span class="err">?</span><span class="p">=</span> <span class="err">$</span><span class="p">(</span><span class="nx">shell</span> <span class="k">go</span> <span class="nx">env</span> <span class="nx">GOOS</span><span class="p">)</span>
<span class="nx">GOARCH</span> <span class="err">?</span><span class="p">=</span> <span class="err">$</span><span class="p">(</span><span class="nx">shell</span> <span class="k">go</span> <span class="nx">env</span> <span class="nx">GOARCH</span><span class="p">)</span>
<span class="nx">CGO_ENABLED</span><span class="p">=</span><span class="mi">0</span> <span class="nx">GOOS</span><span class="p">=</span><span class="err">$</span><span class="p">{</span><span class="nx">GOOS</span><span class="p">}</span> <span class="nx">GOARCH</span><span class="p">=</span><span class="err">$</span><span class="p">{</span><span class="nx">GOARCH</span><span class="p">}</span> <span class="k">go</span> <span class="nx">build</span> <span class="o">-</span><span class="nx">o</span> <span class="err">$</span><span class="p">{</span><span class="nx">BUILD_NAME</span><span class="p">}</span> <span class="err">$</span><span class="p">{</span><span class="nx">APP_MAIN</span><span class="p">}</span>
</code></pre></td></tr></table>
</div>
</div><div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="o">[</span>root@dy-workspace /workspace/gocode-gin<span class="o">]</span><span class="c1"># go env GOOS</span>
linux
<span class="o">[</span>root@dy-workspace /workspace/gocode-gin<span class="o">]</span><span class="c1"># go env GOARCH</span>
amd64
</code></pre></td></tr></table>
</div>
</div><h3 id="6go-build时使用ldflags">6.go build时使用ldflags</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="k">go</span> <span class="nx">build</span> <span class="o">-</span><span class="nx">ldflags</span> <span class="s">&#34;-w -s -X main.Version=${VERSION} -X main.Build=${BUILD}&#34;</span>
</code></pre></td></tr></table>
</div>
</div><p>解释:</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell">-w 去掉DWARF调试信息，得到的程序就不能用gdb调试了。
-s 去掉符号表,panic时候的stack trace就没有任何文件名/行号信息了，这个等价于普通C/C++程序被strip的效果，
-X 设置包中的变量值
</code></pre></td></tr></table>
</div>
</div><h2 id="二go-clean命令清除编译文件">二.go clean命令——清除编译文件</h2>
<h3 id="1go-clean">1.go clean</h3>
<p>Go语言中</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback">go clean
</code></pre></td></tr></table>
</div>
</div><p>命令可以移除当前源码包和关联源码包里面编译生成的文件，这些文件包括以下几种：</p>
<ul>
<li>执行<code>go build</code>命令时在当前目录下生成的与包名或者 Go 源码文件同名的可执行文件。在 Windows 下，则是与包名或者 Go 源码文件同名且带有“.exe”后缀的文件。</li>
<li>执行<code>go test</code>命令并加入<code>-c</code>标记时在当前目录下生成的以包名加“.test”后缀为名的文件。在 Windows 下，则是以包名加“.test.exe”后缀的文件。</li>
<li>执行<code>go install</code>命令安装当前代码包时产生的结果文件。如果当前代码包中只包含库源码文件，则结果文件指的就是在工作区 pkg 目录下相应的归档文件。如果当前代码包中只包含一个命令源码文件，则结果文件指的就是在工作区 bin 目录下的可执行文件。</li>
<li>在编译 Go 或 C 源码文件时遗留在相应目录中的文件或目录 。包括：“_obj”和“_test”目录，名称为“_testmain.go”、“test.out”、“build.out”或“a.out”的文件，名称以“.5”、“.6”、“.8”、“.a”、“.o”或“.so”为后缀的文件。这些目录和文件是在执行<code>go build</code>命令时生成在临时目录中的。</li>
</ul>
<h3 id="2go-clean--i--n">2.go clean -i -n</h3>
<p><code>go clean</code>命令就像 <a href="http://c.biancheng.net/java/">Java</a> 中的<code>maven clean</code>命令一样，会清除掉编译过程中产生的一些文件。在 Java 中通常是 .class 文件，而在Go语言中通常是上面我们所列举的那些文件。</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback">go clean -i -n
</code></pre></td></tr></table>
</div>
</div><p>命令还可以指定一些参数。对应的参数的含义如下所示：</p>
<ul>
<li>-i 清除关联的安装的包和可运行文件，也就是通过<code>go install</code>安装的文件；</li>
<li>-n 把需要执行的清除命令打印出来，但是不执行，这样就可以很容易的知道底层是如何运行的；</li>
<li>-r 循环的清除在 import 中引入的包；</li>
<li>-x 打印出来执行的详细命令，其实就是 -n 打印的执行版本；</li>
<li>-cache 删除所有<code>go build</code>命令的缓存</li>
<li>-testcache 删除当前包所有的测试结果</li>
</ul>
<p>实际开发中<code>go clean</code>命令使用的可能不是很多，一般都是利用<code>go clean</code>命令清除编译文件，然后再将源码递交到 github 上，方便对于源码的管理。</p>
<h3 id="3演示">3.演示</h3>
<p>下面我们以本地的一个项目为例，演示一下<code>go clean</code>命令：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="k">go</span> <span class="nx">clean</span> <span class="o">-</span><span class="nx">n</span>
<span class="nx">cd</span> <span class="nx">D</span><span class="p">:</span><span class="err">\</span><span class="nx">code</span>
<span class="nx">rm</span> <span class="o">-</span><span class="nx">f</span> <span class="nx">code</span> <span class="nx">code</span><span class="p">.</span><span class="nx">exe</span> <span class="nx">code</span><span class="p">.</span><span class="nx">test</span> <span class="nx">code</span><span class="p">.</span><span class="nx">test</span><span class="p">.</span><span class="nx">exe</span> <span class="nx">main</span> <span class="nx">main</span><span class="p">.</span><span class="nx">exe</span>
</code></pre></td></tr></table>
</div>
</div><p>在命令中使用<code>-n</code>标记可以将命令的执行过程打印出来，但不会正真执行。如果既要打印命令的执行过程同时又执行命令的话可以使用<code>-x</code>标记，如下所示：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-go" data-lang="go"><span class="k">go</span> <span class="nx">clean</span> <span class="o">-</span><span class="nx">x</span>
<span class="nx">cd</span> <span class="nx">D</span><span class="p">:</span><span class="err">\</span><span class="nx">code</span>
<span class="nx">rm</span> <span class="o">-</span><span class="nx">f</span> <span class="nx">code</span> <span class="nx">code</span><span class="p">.</span><span class="nx">exe</span> <span class="nx">code</span><span class="p">.</span><span class="nx">test</span> <span class="nx">code</span><span class="p">.</span><span class="nx">test</span><span class="p">.</span><span class="nx">exe</span> <span class="nx">main</span> <span class="nx">main</span><span class="p">.</span><span class="nx">exe</span>
</code></pre></td></tr></table>
</div>
</div><h2 id="三参考文献">三.参考文献</h2>
<p><a href="http://c.biancheng.net/golang/build/">Go语言编译和工具链</a></p>

    </div>

    <div class="post-copyright">
  <p class="copyright-item">
    <span class="item-title">文章作者</span>
    <span class="item-content">ZhangKQ</span>
  </p>
  <p class="copyright-item">
    <span class="item-title">上次更新</span>
    <span class="item-content">
        2022-02-18
        
    </span>
  </p>
  
  
</div>
<div class="post-reward">
  <input type="checkbox" name="reward" id="reward" hidden />
  <label class="reward-button" for="reward">赞赏支持</label>
  <div class="qr-code">
    
    <label class="qr-code-image" for="reward">
        <img class="image" src="/qrcode/wechat-qr-code.jpg">
        <span>微信打赏</span>
      </label>
    <label class="qr-code-image" for="reward">
        <img class="image" src="/qrcode/alipay-qr-code.jpg">
        <span>支付宝打赏</span>
      </label>
  </div>
</div><footer class="post-footer">
      <div class="post-tags">
          <a href="/tags/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/">开发语言</a>
          <a href="/tags/%E5%90%8E%E7%AB%AF/">后端</a>
          <a href="/tags/golang/">golang</a>
          <a href="/tags/go%E8%AF%AD%E8%A8%80/">go语言</a>
          <a href="/tags/%E7%BC%96%E8%AF%91/">编译</a>
          <a href="/tags/%E5%B7%A5%E5%85%B7%E9%93%BE/">工具链</a>
          <a href="/tags/clean/">clean</a>
          </div>
      <nav class="post-nav">
        <a class="prev" href="/post/linux/build/linux%E6%BA%90%E7%A0%81%E5%8C%85%E5%92%8C%E4%BA%8C%E8%BF%9B%E5%88%B6%E5%8C%85%E5%AE%89%E8%A3%85%E6%95%99%E7%A8%8B/">
            <i class="iconfont icon-left"></i>
            <span class="prev-text nav-default">[linux] Linux源码包和二进制包安装教程</span>
            <span class="prev-text nav-mobile">上一篇</span>
          </a>
        <a class="next" href="/post/linux/pacemaker%E5%BC%80%E6%BA%90%E9%9B%86%E7%BE%A4%E8%B5%84%E6%BA%90%E7%AE%A1%E7%90%86%E5%99%A8%E5%9F%BA%E7%A1%80%E6%95%99%E7%A8%8B/">
            <span class="next-text nav-default">[linux] Pacemaker集群资源管理器原理及部署</span>
            <span class="next-text nav-mobile">下一篇</span>
            <i class="iconfont icon-right"></i>
          </a>
      </nav>
    </footer>
  </article>
        </div>
        

  

  

      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="social-links">
      <a href="mailto:wdyxzkq@163.com" class="iconfont icon-email" title="email"></a>
      <a href="https://github.com/dysoso" class="iconfont icon-github" title="github"></a>
      <a href="https://gitee.com/dysoso" class="iconfont icon-gitlab" title="gitlab"></a>
  <a href="https://blog.nevergiveup.tech/index.xml" type="application/rss+xml" class="iconfont icon-rss" title="rss"></a>
</div>

<div class="copyright">
  <span class="power-by">
    由 <a class="hexo-link" href="https://blog.nevergiveup.tech/">blog.nevergiveup.tech</a> 强力驱动
  </span>
  <span class="division">|</span>
  <span class="theme-info">
    主题 - 
    <a class="theme-link" href="https://github.com/olOwOlo/hugo-theme-even">Even</a>
  </span>

  

  <span class="copyright-year">
    &copy; 
    2021 - 
    2022<span class="heart"><i class="iconfont icon-heart"></i></span><span><a href="https://beian.miit.gov.cn/">蜀ICP备2021005948号-1</a></span>
  </span>
</div>

    </footer>

    <div class="back-to-top" id="back-to-top">
      <i class="iconfont icon-up"></i>
    </div>
  </div>
  
  <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/slideout@1.0.1/dist/slideout.min.js" integrity="sha256-t+zJ/g8/KXIJMjSVQdnibt4dlaDxc9zXr/9oNPeWqdg=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.js" integrity="sha256-XVLffZaxoWfGUEbdzuLi7pwaUJv1cecsQJQqGLe7axY=" crossorigin="anonymous"></script>



<script type="text/javascript" src="/js/main.min.c99b103c33d1539acf3025e1913697534542c4a5aa5af0ccc20475ed2863603b.js"></script>


<script type="application/javascript">
var doNotTrack = false;
if (!doNotTrack) {
	window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
	ga('create', 'never-give-up', 'auto');
	ga('set', 'anonymizeIp', true);
	ga('send', 'pageview');
}
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>







</body>
</html>
